(a) Field of the invention:
This invention relates to an automatic focus detecting method and apparatus used in such optical systems as microscopes and cameras, and more particularly to an automatic focus detecting method and apparatus wherein two images formed through different light paths are respectively converted to photoelectric output signals by a photoelectric converting device made by arranging many elements. The relative positional relationships between the two images are detected on the basis of the photoelectric output signals to detect the focus state of the optical system.
(b) Description of the prior art:
Among conventional automatic focus detecting devices of this kind, there are the range finder type (wherein a trigonometric measurement is applied) and a TTL system (wherein a light pencil passing through a pupil is divided to obtain two images). In either of these systems, correlation of two images is digitally determined to detect the coincidence of the two images. Coincidence is indicated when a correlative value between the two images reaches a maximum. The relative movement of the two images is indicated by the phase differences between the images.
FIG. 1 shows an example of such conventional automatic focus detecting devices. The data A and B of two images picked up by an image sensor (not shown) are memorized respectively in ring-shaped shift registers 1a and 1b through a sample holding circuit, A-D converter (not shown), etc. In this example, the image data are formed of 128 elements.
When both image data A and B are addressed respectively in the shift registers 1a and 1b, then the absolute values of the differences of the respective elements will be determined by circuits 2 which determine the absolute values of the differences between the signals. Furthermore, the sum of the absolute values will be determined by an adding machine 3 to obtain the correlative value of two images. Then, the image data B of the shift register 1b will be shifted by 1 element by a pulse from a clock CL and again the correlative value will be determined by the circuit 2 and adding machine 3. Thus, whenever the image data on one hand are shifted in turn by the clock CL, the correlative value will be determined. In addition, the maximum value of the correlative value will be determined by a peak detector 4, and the position in which the maximum value is detected will be the in-focus position. Also, the clock pulse number of the maximum value will be determined by a counter 5. This clock number, (that is, the shifting amount of the image data B of the shift register 1b) will denote the phase difference between the two images, and the direction and amount of de-focus will be derivable from the known phase difference.
However, in this conventional device, since the image sensor has a fixed size, not only must the two images formed on the image sensor shift positions, but also the end portions of the images will be different. As a result, the image data A and B memorized in the two shift registers 1a and 1b will not only shift in position, but will also be different in their end portions. Thus, as the correlation is computed while circulating these image data in turn, no accurate phase difference of the image can be determined. This point will be explained in detail with reference to FIGS. 2A to 2C. FIGS. 2A and 2B show respectively the image data A stored in the shift register 1a, and the image data B stored in the shift register 1b. When not in-focus, the image data A and B will not coincide with each other; therefore the peaks P and P' will not coincide with each other and both image data A and B will be different at their end portions. FIG. 2C shows the image data B of the shift register 1b which have been shifted by .alpha. pieces of the image element. In this case, as the peaks P and P" coincide with each other, the phase difference of both image data A and B will be found to correspond to .alpha. pieces of the image element. The portion from 0 to .alpha. of the image data shown in FIG. 2C corresponds to that portion of the B data from .beta. to 127 shown in FIG. 2B. Therefore, the image data of FIGS. 2A and 2C do not perfectly coincide with each other. That is to say, if the correlations of all the image data of the numbers 0 to 127 of the image elements are computed, when the image phase difference is zero (that is, when the peaks P and P" coincide with each other), the correlative value will not always be an extreme or threshold value. Therefore, in this device, it is difficult to determine an accurate image phase difference.
Also, in this known device, as the image data are moved by only one image element at a time, detecting a large de-focus will take too much time.
Further, if the pitch of the elements of the image sensor is made small to obtain focusing precision, or if the number of the elements of the image sensor is reduced to improve operational speed, the range of the image sensor will become so narrow that the object will have to be brought to a limited narrow part in the visual field. On the other hand, if the range of the image sensor is made wide, the number of sensor elements will become so large that the operational time will be much longer.